/**
 * Project: push-center-biz-dal
 * 
 * File Created at 2014年10月9日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package com.greenline.push.dal.pushcenter;

import java.util.List;

import com.greenline.push.dal.pushcenter.dataobject.AppChannelDO;
import com.greenline.push.dal.query.AppChannelQuery;

/**
 * @Type AppChannelDAO
 * @Desc
 * @author zhaoli
 * @date 2014年10月9日
 * @Version V1.0
 */
public interface AppChannelDAO {
	/**
	 * 新增
	 * 
	 * @param appChannel
	 * @return 新增数据的ID
	 */
	Long insert(AppChannelDO appChannel);

	/**
	 * 根据ID获取
	 * 
	 * @param id
	 * @return AppChannelDO
	 */
	AppChannelDO getAppChannelById(Long id);

	/**
	 * 跟新
	 * 
	 * @param appChannel
	 * @return -1 表示更新失败；>0 表示更新成功
	 */
	int update(AppChannelDO appChannel);
	
	/**
	 * 分页查询
	 * @param query
	 * @return
	 */
	AppChannelQuery listByQuery(AppChannelQuery query);
	
	/**
	 * 删除
	 * 
	 * @param id
	 * @return -1 表示更新失败；>0 表示更新成功
	 */
	int delete(Long id);

    List<AppChannelDO> listByExample(AppChannelDO appChannel);
}
